<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const arr = [1, 2, 3, 4, 5, 6]
        function every (arr) {
            for (const item of arr) {
                if (item % 2 !== 0) {
                    return false;
                }
            }
            return true;
        }
        const res = arr.every(function (item) {
            return item % 2 === 0;
        })
        console.log(res);


        const students = [
            {
                name: '张三',
                age: 19,
            },
            {
                name: '李四',
                age: 19,
            },
            {
                name: '王麻子',
                age: 19,
            }
        ];
        const result = students.every(function (item) {
            return item.name.length > 2;
        })
        console.log(result);


        const result1 = students.findIndex(function (item) {
            return item.name === '李四';
        })
        console.log(result1);
    </script>
</body>
</html>吗， 